const express = require('express');
const path = require('path');
const app = express();

app.use(express.static('public'));
// 初始化模板引擎
app.engine('html', require('express-art-template'));
app.set('view options', {
    debug: process.env.NODE_ENV !== 'production'
});
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'html');

app.get('/', (req, res) => {
    res.render('index.html')
})

app.get('/inputGrade', (req, res) => {
    res.render('inputGrade.html')
})

app.listen(8080, () => {
    console.log("server is run at 8080 port");
})